Acoustic and video imaging system for quality determination of agricultural products

ABSTRACT

A flexible system for determining the quality of agricultural products based on characteristics such as, for example, mass, shape, hardness, size, color and surface texture is disclosed herein. The quality determination apparatus includes a feeder assembly for sequentially dropping individual product samples upon an impact transducer arrangement. The impact transducer generates transducer signals indicative of the physical characteristics of each product sample. In addition, an imaging device operates to synthesize a digital image representation of each product sample. The transducer signal and digital image representation corresponding to each product are analyzed so as to determine the appropriate degree of quality to be associated therewith.

The U.S. government has certain rights in the invention pursuant tocontract No. ITA 87-02 between the U.S. Department of Commerce and IowaState University.

The present invention relates generally to quality control ofagricultural products, and particularly to quality control techniquesinvolving acoustical and video signal processing.

BACKGROUND OF THE INVENTION

Interest in using image processing to aid in quality control and gradingfor a variety of agricultural products has recently become a subject ofconsiderable research. In particular, efforts have been made to usecomputer-assisted imaging techniques to facilitate recognition ofdefective agricultural products. Computer imaging systems generallyinclude a color video camera connected to a frame grabber. The framegrabber digitizes the image provided by the camera and relays the imageinformation to a computer. Analysis of the digital image information maythen be performed using a variety of techniques. In particular, thepotential has been shown to discriminate between crop seeds and certaincommon contaminants based on image parameters such as area, perimeter,aspect ratio, shape factor, and the like. Other applications haveinvolved classification of diploid and tetraploid ryegrass seeds, andorientation determination of vegetables using grey-level intensitygradients and syntactic pattern recognition techniques.

By way of example, a computer vision system for determining soybeanquality based on size and shape parameters has been developed (seeMisra, et al., Computer Vision for Soybeans, presented at the 1989International Summer Meeting of American Society of AgriculturalEngineers and Canadian Society of Agricultural Engineering, Paper No.89-3001). Images of a soybean are first captured using a charge-coupleddevice (CCD) camera and digitized by a frame grabber. The imageprocessing sequence is initiated by determining an outline of thesoybean under analysis by searching for contrasts between the portionsof the image corresponding to the background and to the soybean itself.A routine is then used to fit an ellipse to the outline, sinceacceptably healthy soybeans were found to be generally elliptical inshape. While capable of successfully discriminating between soybeanshaving varying degrees of quality, it is believed that the efficiency ofthe machine vision system described above could be improved bymodification of particular aspects of the disclosed image processingsequence.

Concurrent with the development of the image processing techniquesdescribed above, efforts have been made to develop acoustical methods ofanalysis based on the transmittance, absorption or reflection of soundwaves by agricultural products. These techniques are based on therealization that even minor changes in the structure or health of aproduct will result in variation of its acoustic properties. Suchvariations can be quantitatively evaluated by analyzing the frequencycomponents of the sound wave. Frequency data is generally processedusing analytic procedures such as the Fast Fourier Transform (FFT),which can be performed to identify the ways in which selectedfrequencies are absorbed, transmitted or reflected by the product beinginvestigated. These frequency response characteristics can be correlatedwith various physical properties of the product related to quality.

In the particular case of the analysis of soybeans, at least two typesof acoustical methods have been investigated (see, e.g., Misra, et al.,Acoustic Properties of Soybeans, Transaction of the American Society ofAgricultural Engineers, 33(2):671-677). In a first, or "acoustictransmission" technique, a soybean kernel is placed between input andreceiving transducers where the former introduces an acoustic impulse tothe kernel and the latter records the wave transmitted through thekernel. Both waves, the input and the transmitted, can be digitallyrecorded and analyzed by a Fast Fourier Transform. The two spectra canthen be compared, usually by dividing the transmitted wave by the inputwave to identify frequencies that are preferentially absorbed by thekernel so as to provide an indication of kernel quality. Specifically,quality may be determined by analyzing the differences in the absorptionspectra of a "good" or reference soybean and the soybean under scrutiny.Unfortunately, the acoustic transmission spectra of an ideal soybean hasbeen found to be difficult to describe mathematically. Accordingly,correlation between the transmission spectra and size or mass of thesoybean has not been possible, thus precluding effective qualitydetermination. Moreover, the placement of each soybean between thetransducers has been found to be a relatively slow process.

A second, or "impact-force" method of acoustical characterization ofsoybeans involves dropping soybeans through a guide tube coupled to apiezoelectric force transducer. An impact signal generated by thetransducer is routed to a digitizer and then to a computer. A computerprogram then operates to derive the frequency spectra of the impactsignal by using an FFT algorithm. As in the acoustic transmissiontechnique, correlation of the frequency spectra of the impact signalwith a set of quality parameters requires the spectra to bemathematically described. Such a description could be effectuatedthrough, for example, polynomial approximations, sine functions, orsimple Bessel functions. Although the impact-force method has been shownto allow for faster determination of soybean quality, thefrequency-domain procedure outlined above is relatively computationallyintensive. That is, the procedure requires an initial FFT conversion ofthe impact signal into the frequency domain and a subsequentparameterization of the spectral characteristics so obtained. It is thusbelieved that a time-domain method for analyzing the transducer signalproduced by an impact-force apparatus would allow for a more rapiddetermination of the quality of an agricultural product beinginvestigated.

While image processing and acoustical techniques have each been ofseparate assistance in determining the quality of agricultural products,a system incorporating both of these methodologies would allow forincreased flexibility with respect to the criterion used for qualitydetermination. For example, such an integrated system would allow a userto specify that a set of product characteristics derived from both theacoustical and video reals constitute the basis for acceptable quality.

OBJECTS OF THE INVENTION

It is an object of the present invention to provide a system fordetermining the quality of agricultural products in which isincorporated both image processing and acoustical techniques.

It is a further object of the present invention to provide such aquality determination system adapted to analyze agricultural productssuch as soybeans and the like.

SUMMARY OF THE INVENTION

The present invention addresses the need for a flexible system fordetermining the quality of agricultural products based oncharacteristics such as, for example, mass, hardness, shape, color andsurface texture. The inventive quality determination apparatus includesa feeder assembly for sequentially dropping individual product samplesupon an impact transducer arrangement. The impact transducer generatestransducer signals indicative of particular physical characteristics ofeach product sample. In addition, an imaging device operates tosynthesize a digital image representation of each product sample. Thetransducer signal and digital image representation corresponding to eachproduct are then analyzed so as to determine the appropriate degree ofquality to be associated therewith.

BRIEF DESCRIPTION OF THE DRAWINGS

Additional objects and features of the invention will be more readilyapparent from the following detailed description and appended claimswhen taken in conjunction with the drawings, in which:

FIGS. 1a and 1b show a see-through side view and front view,respectively, of a preferred embodiment of the agricultural productquality determination system of the present invention.

FIGS. 2a and 2b depict a drop tube feeder apparatus in greater detail asassembled, and as partially disassembled, respectively.

FIG. 3 shows a more detailed side view of an agricultural productholding bin and product rejection device.

FIG. 4 provides a block-diagrammatic overview of the signal processingelements incorporated within the inventive agricultural product qualitydetermination system.

FIG. 5 shows a flow chart of a time-domain impact signal analysisroutine.

FIG. 6 illustratively represents the electrical output of the impacttransducer generated in response to the impact of a soybean thereupon.

FIG. 7 depicts a flow chart of an imaging analysis routine utilized bythe inventive quality determination system.

FIG. 8 shows a flow chart illustrating the manner in which a signalgenerated by a photocell is processed by the present invention.

FIG. 9 depicts a simplified illustration of a digital imagerepresentation of a field of view encompassed by the imaging deviceincluded within the inventive quality determination system.

FIG. 10 is a flow chart summarizing the manner in which the edge of animage of an agricultural product sample is distinguished from thebackground of a digital image representation thereof.

FIG. 11 illustratively represents a set of eight direction vectors usedin a boundary search operation performed in connection with the digitalimage analysis of each product sample.

FIG. 12 depicts the manner in which the shape and the boundary roughnessof each soybeam may be calculated using an accumulated set of boundarypixels and the location of the center of the soybean.

FIG. 13 depicts the manner in which the texture, area and color of thesurface of each soybean may be calculated using a pixel-by-pixelcomparison and area normalization.

FIG. 14 is a flow chart depicting implementation of a texture analysisprogram.

DESCRIPTION OF THE PREFERRED EMBODIMENT Description of MechanicalApparatus

Referring to FIGS. 1a and 1b, there are shown a see-through side viewand a front view, respectively, of a preferred embodiment of theagricultural product quality determination system 10 of the presentinvention. The inventive system 10 is adapted to analyze relatively firmagricultural products, such as soybeans and various other varieties ofbeans and the like. Nonetheless, it is understood that the specificmechanical implementation of the system 10 depicted in FIG. 1 may bemodified to accommodate analysis of agricultural products of varyingsize and firmness.

The quality determination system 10 is enclosed within a housing 20 andincludes a drop tube feeder apparatus 30, a video imaging device 40, anda quality control rejection device 50. As is described in detail below,the soybeans or other agricultural products to be analyzed are loadedinto a sample container 60 included within the feeder apparatus 30. Arotating disk (not shown in FIGS. 1A and 1B) within the sample container60 allows one soybean at a time to slide down a drop tube 70 and fallupon an impact transducer 80. An acoustical impact signal generated bythe transducer 80 is then digitized and routed to a computer (not shown)for analysis. Based on this analysis the quality of the soybean may beevaluated in terms of mass and hardness. The soybean is deflected by thetransducer 80 into a U-channel trough 90, which guides the soybean to aholding bin 100.

The video imaging subsystem 40 operates to create a digital imagerepresentation of the soybean while it is confined in the holding bin100. The digital image representation of the soybean is then processedso as to enable a determination of quality to be made on the basis ofparameters such as lustre, color, shape and roughness. The inventivesystem 10 is designed such that a user may specify the extent to whicheach of the acoustical and image parameters mentioned above contributesto the criteria used in making an overall assessment of soybean quality.As shown in FIG. 1A, the rejection device 50 routes soybeans to eitheraccepted bean bin 120 or rejected bean bin 130 from the holding chamber100 in accordance with such a composite quality evaluation.

FIGS. 2A and 2B depict the drop tube feeder apparatus 30 in greaterdetail as assembled, and as partially disassembled, respectively.Referring to FIG. 2A, a flange 140 appended to a lower portion of thecontainer 60 is designed to increase the number of number of soybeanswhich may be accommodated therein. That is, given the 45 degreeorientation of the feeder apparatus 30 the soybeans loaded therein willtend to settle within the lower portion of the container 60. The flange140 has been omitted from FIG. 2B for purposes of clarity. The samplecontainer 60 further includes a cylindrical housing member 150 securedby first and second brackets 152 and 154 to a motor 158. A rotating disk160 approximately 4 inches in diameter is positioned within housingmember 150. As shown in FIG. 2B, the disk 160 defines a set of fourholes 170 having diameters slightly larger than the diameter of thesoybeans included within sample container 60. Consequently, the holes170 will generally be less than 0.5 inches in diameter. The disk 160 iscoupled by conventional hardware 166 to a drive shaft 175 of motor 158,thereby allowing easy interchange of disks when soybeans of a differentdiameter are loaded into the container 60.

As the disk 160 is rotated about an axis A by shaft 175, the cavitiesdefined by each of the holes 170 and the portion of the housing 150underlying the disk 160 will capture a soybean upon passing through thesoybeans accumulated in the lower portion of the container 60. If thecavity corresponding to a particular hole 170 happens to capture morethan a single soybean, gravity will tend to cause all but one to fallout as the cavity rotates to an upper portion of the container 60. Inthis way rotation of the disk 160 causes each of the holes 170 toperiodically become aligned with a similarly dimensioned aperture 190defined by an upper portion of the housing 150. During each suchalignment a single soybean passes from the container 60 through aperture190 into the drop tube 70, which is also aligned with the aperture 190.The disk 160 is rotated each time the acoustical and video data acquiredfor a particular soybean has been processed in a manner to be discussedbelow, and remains stationary during the intervening intervals. It hasbeen found that the inventive system 10 is capable of processing atleast one soybean per second, which corresponds to an average diskrotation rate of approximately 15 revolutions per minute.

Again referring to FIGS. 2A and 2B, the drop tube 70 is typicallyapproximately 4 inches in length, is oriented at 45 degrees relative tovertical, and extends into a rectangular coupling member 210 of theU-channel trough 90. The impact transducer 80 is secured by hardware 220to a third bracket 230, with the third bracket 230 being affixed to thecoupling member 210 using hardware 240. The bracket 230 serves toposition the impact transducer 80 such that soybeans falling from thedrop tube 70 are deflected by the transducer 80 into the 3/4" U-channeltrough 90. The transducer 80 may be implemented with, for example, aconventional impact transducer manufactured by PCB Piezotronics ofDepew, N.Y., part no. 208A02. Subsequent to deflection by the transducer80, each soybean slides through the U-channel trough 90 into the holdingbin 100.

FIG. 3 shows a more detailed side view of the holding bin 100 andrejection device 50. Also shown in FIG. 3 is U-shaped fluorescentlighting source 250 interposed between the holding bin 100 and a lenselement 260 of the video imaging device 40. The imaging device 40 isdesigned to create a digital image representation of each soybeanentering the holding bin 100 from the trough 90. Such an imaging systemcould be conventionally realized using an arrangement consisting of acamera, and a frame grabber. Preferably, however, the imaging device 40will be implemented with an integrated unit similar to, for example, aconventional slide scanner. A slide scanner having suitable resolutionis available from RasterOps Corp. of Santa Clara, Calif., as the"Expresso". The device produces either standard NTSC or PAL videooutput, and images can be captured by a computer using a frame grabberboard.

Referring to FIG. 3, lens element 260 is in optical alignment with animage axis I, while the U-shaped lighting source 250 partially encirclesthe axis I. The lighting source 250 provides uniform illumination overthe surface of soybeans within the holding bin 100, and may beimplemented with, for example, a 110 Volt fluorescent tube. The imagingdevice 40 is triggered to create an image of the contents of the holdingbin 100 following impact of a soybean upon the transducer 80. Again, theimpact signal generated by the transducer 80 may be monitored todetermine the precise time at which a soybean collides with thetransducer 80. As is discussed more fully below, the present inventionemploys an object detection scheme to determine when a soybean entersthe field of view of lens element 260 upon entering holding bin 100after being deflected by the impact transducer 80. The object detectionprocess is repeated until the imaging system 40 is successful incapturing an image of the soybean. Given that soybeans are generallyyellow in color, in the presently preferred embodiment of the inventivesystem 10 the interior surfaces of the holding bin 100 are painted flatblack in order to improve the contrst of the digital imagerepresentation.

As is shown in FIG. 3, a photocell 270 for determining soybean lustre(reflectivity) is mounted on an interior surface 272 of the holding bin100. The photocell 270 will preferably be installed within a 3/4"diameter tube oriented downward at 45 degrees relative to the binsurface 272. The photocell 270 is disposed to continuously provide anelectrical signal indicative of the amount of radiant energy from thelighting source 250 reflected by the holding bin 100 and by any soybeanstherein. Soybean reflectivity is determined by sampling the photocellsignal, generally at a sampling rate of less than 1 MHz, during aninterval immediately following generation of the impact signal. Betweenone and three hundred samples will typically be averaged and the resultcompared with a background photocell signal (i.e., the signal producedby photocell 270 when no soybeans are present within the holding bin100). The results of this comparison are indicative of soybeanreflectivity, and are stored in the memory of a host computer describedbelow. The photocell 270 can be conventionally realized using, forexample, a cadmium sulphide photocell, available from Radio Shack, Inc.,part no. 276-116. Referring to FIG. 3, the holding bin 100 includes ahinged floor 280 coupled to a first solenoid 290. After an image of thesoybean within the holding bin 100 has been created by the imagingdevice 40, solenoid 290 is actuated and operates to rotate floor 280clockwise about hinge 310. The soybean resting on floor 280 then fallsthrough chute 320 and either is collected by rejected soybean bin 130,or is deflected by a hinged arm 340 into accepted soybean bin 120. Ifthe soybean has been determined to be of acceptable quality a secondsolenoid 360 having a shaft 370 coupled by an "O" ring (not shown) tohinged arm 340 operates to rotate arm 340 clockwise about hinge 360. Thefalling soybean is thereby deflected by arm 340 into accepted soybeanbin 120. The first and second solenoids 290 and 360 then return thefloor 280 and arm 340 to their respective initial positions.

Description of Computer and Interface

FIG. 4 provides a block-diagrammatic overview of the signal processingelements incorporated within the inventive agricultural qualitydetermination system 10. General computing capability is provided by aGateway 386-33 microcomputer 345 operative at 33 MHz. The Gateway 386-33includes an IBM PC/AT compatible microcomputer based on an Intel80386-33 processor together with an Intel 80387-33 math co-processor,and also was equipped with four megabytes of random access memory (RAM),disk drives, and a hard drive. When the imaging device 40 isconventionally implemented using a standard video camera, a Targa-16color image capture board (frame grabber) having 512 kilobytes of staticRAM enables the Gateway 386-33 to digitize electronic photographs fromthe camera. This enables display of the digital image representationsynthesized by the imaging device 40 on an analog RGB monitor or an NTSCcolor video monitor. The captured images exhibited 512 (horizontal) by483 (vertical) pixel resolution, with each pixel representing one of32,768 displayable colors.

Referring to FIG. 4, a Keithly DAS-50-1M, A/D high speed interface card380 for digitizing the impact and photocell signals is incorporatedwithin the microcomputer. The Keithly DAS-50 provides a 1 MHz conversionrate, and is equipped with an on-board memory buffer for locally holdingdata until access is requested by a transfer command from themicrocomputer. The impact signal from transducer 80 is routed to channel#0 of the interface card 380, while the signal from the photocell 270 isreceived by channel #1. In order to access the interface card 380, aseries of ASCII commands are sent by software resident within themicrocomputer in accordance with the syntax for the card 380.Specifically, a procedure written in the Pascal computer language linkedwith an assembly language subroutine has been written to read registersof the interface card 380, and to control the transfer of informationfrom the interface card data buffer.

Again referring to FIG. 4, the first and second solenoids 290 and 360are controlled by the microcomputer via a PIO-12 input/output board 385in conjunction with an ERA-01 8-channel relay board 395. A group ofdevice functions for controlling the solenoids 290 and 360 have beenwritten using Microsoft Macro-Assembler.

Analysis of Impact Signal

FIG. 5 shows a flow chart of the time-domain impact signal analysisroutine. Again, the impact signal is generated in response to deflectionof a soybean by the impact transducer 80. The analysis routine iscommenced (step 400) by rotating (step 405) the feeder disk 160 withinthe drop tube apparatus 30 until impact of a soybean upon the transducer80. This impact is detected by monitoring (step 410) the electricaloutput of the transducer 80 in the manner shown in FIG. 6. As shown inFIG. 6, impact is deemed to occur at time t₁ when the electrical outputof the transducer 80 rises to a value of (1+x)VO, where VO correspondsto the quiescent transducer output signal and the default value of x is0.1. The feeder disk 160 is then stopped (step 415) and the impactsignal is digitized by the interface card 380 (FIG. 4) at a 1 MHzsampling rate (step 420). The initial 1024 samples of the impact signalare then transferred (step 425) from the interface card 380 to themicrocomputer. A largest sample value (Vmax) is then identified, and agroup of ten sample values centered about the largest value (e.g., thefour samples preceding Vmax and the five subsequent samples) are thenaveraged in order to determine a peak value proportional to soybean mass(step 430). The mass of each soybean may be determined (step 435) byinserting the peak value of the impact signal associated therewith intoan empirical relationship stored within the microcomputer. Specifically,an empirical linear equation relating soybean mass to peak impact signalmagnitude may be formulated by dropping soybeans of known mass throughthe drop tube 70 and recording the magnitude of the impact signalcorresponding to each.

Again referring to FIG. 6, it has been found that soybean hardness isrelated to the spread of the impact signal proximate the peak region.This spread corresponds to the time (t₂ -t₁) separating the two pointsat which the impact signal value is equal to (1+x)VO. However, since thespread of the impact signal is correlated with mass, hardness may not beuniquely determined solely on the basis of the time differential t₂ -t₁.Fortunately, it has also been determined that the slope of the impactsignal proximate time t₂ is proportional to hardness and independent ofsoybean mass. The slope at time t₂ may be found (step 440) byapproximating a straight line, hereinafter referred to as the hardnessline, based on a set of values of the impact signal between Vmax and theimpact signal value of 1.1 VO at time t₂. A line-fitting routine such asthat described by Press, et al. in Numerical Recipes--The art ofScientific Computing, pp. 504-505 may be used to fit this set of valuesof the impact signal in a minimum sum-of-squares error sense to astraight line corresponding to the hardness line (step 445).

The hardness line may also be used to detect flaws in the internalstructure of the soybean. Specifically, it has been found that theminimum sum-of-squares error between the set of signal values used tocalculate the hardness line and the hardness line itself is larger forsoybeans that are broken, shrivelled, or diseased than for healthysoybeans. It follows that a user-defined quality determination based onany desired combination of soybean mass, hardness and internal structuremay be made on the basis of the time-domain analysis of the impactsignal (step 450). For example, all soybeans below a certain mass, orthose characterized by a sum-of-squares error larger than a predefinedthreshold, may be classified as unacceptable. The determination ofsoybean quality based on such a set of user-defined criteria concludesthe impact signal analysis routine (step 455).

Digital Image Analysis

FIG. 7 depicts a flow chart of the imaging analysis routine conductedsubsequent to completion of the impact signal analysis routine. Theimaging routine is commenced (step 500) by measuring soybean lustre byprocessing (step 510) the signal generated by the photocell 270 as shownin FIG. 8. Referring to FIG. 8, the microcomputer initiates (step 511)the photocell analysis routine by resetting (step 512) the interfacecard 380 (FIG. 4). Again, the photocell 270 is disposed to continuouslyprovide an electrical signal indicative of the amount of radiant energyfrom the lighting source 250 reflected by the holding bin 100 and by anysoybeans therein. The interface card 380 samples the photocell signal,generally at a sampling rate of less than 1 MHz, during an intervalimmediately following generation of the impact signal. Between one andthree hundred samples will typically be stored (step 505) within thechannel #1 buffer of the interface card 380. The microcomputer finds theaverage (steps 513 and 514) of these samples and compares (step 515) theresult with a background photocell signal (i.e., the signal produced byphotocell 270 when no soybeans are present within the holding bin 100).The results of this comparison are indicative of soybean lustre(reflectivity), and will preferably be stored (steps 516 and 517) withinthe microcomputer to be used in a subsequent evaluation of soybeanquality based on the outcome of the remaining portions of the imaginganalysis routine.

As is indicated in FIG. 7, the next step (step 519) in the imaginganalysis routine involves detecting the entrance of a soybean into thefield of view of the imaging device 40. Since the path taken by soybeansfalling from the trough 90 into the holding bin 100 may be controlled byvarying the angle of the trough 90, a search window within the center ofthe digital representation generated by the imaging device 40 may bemonitored to detect the presence of soybeans. Specifically, FIG. 9depicts a simplified illustration of a digital image representation ofthe field of view F of the imaging device 40, in which is included asoybean S and upon which is superimposed a dashed line indicative of thelocation of a search window W and a dotted line showing the path P ofsoybean S. A background reference is calculated for each searchoperation by averaging the values of first and second reference pixelsR1 and R2 located proximate the periphery of the field of view F. Whenthe average value of the approximately forty pixel elements within thesearch window W differs by a predetermined threshold from the backgroundreference, a soybean is deemed to exist within the window W. Themicrocomputer then sets a flag (step 520) to trigger the edge detectionoperation (FIG. 7). If a soybean is not found within the search windowW, the search operation is repeated until a soybean is located (steps525, 530, 532 and 534).

FIG. 10 is a flow chart summarizing the manner in which the edge of thesoybean S is distinguished from the background of the digital imagerepresentation. In particular, the pixel elements located on a verticalline originating at the upper periphery of the field of view F (FIG. 9)proximate reference pixel R1 are sequentially compared (steps 535 and540) against the background reference. A first point on the edge of thesoybean S is considered to have been located (step 545) when the valueof a pixel on this vertical line exceeds the background pixel value by apredetermined amount. If the lower boundary of the field of view isreached (step 550) before finding a suitably bright pixel, the programpauses and then makes a second attempt to find the soybean edge. If thesecond attempt is unsuccessful (step 555) the soybean is rejected as apoor quality bean. The edge detection routine is resumed again whenanother soybean is detected within the search window W.

Once a first pixel point on the edge of the soybean has been located aboundary search operation is commenced (step 560). During the boundarysearch process a set of pixel locations located on the boundary of thesoybean are accumulated (step 565), thereby allowing the shape of thesoybean to be determined (FIG. 7, step 568). The boundary searchoperation proceeds in a counterclockwise manner around the edge of thesoybean, and involves finding the most likely direction of the nextboundary pixel relative to the position of the boundary pixel lastlocated. Specifically, FIG. 11 illustratively represents a set of eightdirection vectors used in the boundary search operation. Since thesearch proceeds counterclockwise, after the first edge pixel has beenfound the value of a test pixel located left (i.e., in direction 2) ofthe first edge pixel by a search radius is compared with a referencevalue equal to the value of the first pixel less a predefined number ofintensity units. If the value of the test pixel exceeds the backgroundvalue it is deemed to be the second edge pixel. If the value of the testpixel is not sufficiently large relative to the reference, a second testpixel is identified by finding the pixel located in direction 3 relativeto the first pixel, and separated therefrom by a distance approximatelyequivalent to the search radius. This process is repeated for testpixels at direction vectors 4, 5, 6, . . . , etc. until a suitablybright test pixel is found. The search process may be expedited byaltering the direction vector initially searched after accumulation ofeach edge pixel. For example, if the most recent edge pixel found islocated in direction 4 relative to the previous edge pixel, direction 3will first be searched in attempting to locate the next edge pixel. Inthis way the search process "remembers" the relative location of theprevious edge pixel and thus more efficiently tracks the soybeanperimeter.

The boundary search operation results in the accumulation (step 570) ofa set of pixels which approximate the soybean boundary. The accuracy ofthe approximation may be increased by reducing the search radius, butsuch a reduction tends to lengthen the duration of the search processsince more boundary points are accumulated. The process terminates whenan edge pixel is found within an area of predefined size (e.g., a 4×4pixel area) relative to the first edge (steps 575 and 580) pixel.Alternatively, the process is aborted (steps 585, 590 and 592) ifgreater than a maximum number, typically on the order of one-thousand,of edge pixels are accumulated without satisfying the terminationcriteria mentioned above.

Next, the location of the center of the soybean is calculated (step 595)using the accumulated set of boundary pixels. This calculation may beperformed, for example, by finding a major elliptical axis correspondingto the line between the most widely separated pixel locations. Thelocation of the soybean center may be approximated by finding themidpoint of this line.

FIG. 12 depicts the manner in which the shape and surface texture(roughness) of each soybean may be calculated using the accumulated setof boundary pixels and the location of the center of the soybean.Specifically, the boundary defined by the accumulated set of edge pixelsis divided into three-hundred sixty parts (θ=0 to 359 degrees) and thedistance "di", i=0 to 359, from the center to each is then calculated.The distance di may then be plotted as a function of the angle θ asshown by the edge data curve D in FIG. 12. The plot corresponding to areference ellipse R is superimposed over the curve D by aligning thedata point corresponding to the major axis of the reference ellipse withthe first peak in the edge data curve D.

The roughness of the soybean may be estimated (see FIG. 7, steps 600 and605) by computing the variance between the edge data point di and itsneighborhood di+1 over θ=0, 1, 2, . . . , 360 degrees. Referring to FIG.12, roughness may be quantified as Σ(di-d_(i+1))² /360, where "i" rangesfrom 0 to 359. A user may indicate tolerance for roughness by specifyingthe maximum variance between the curves D and R to be exhibited byaccepted soybeans. Similarly, an estimate of the extent to which theshape of the soybean agrees with the reference ellipse R may be obtainedby finding the error σ between the reference ellipse R and the edge datacurve D. Again with reference to FIG. 12, shape error may be quantifiedas Σσ_(i) ² /360, where "i" ranges from 0 to 359. Again, a user mayspecify the maximum value of shape error to be associated with soybeansof acceptable quality. Finally, an indication of soybean roundness maybe obtained by finding the ratio of the minor axis to the major axis.

FIG. 13 depicts the manner in which the texture, area and color of thesurface of each soybean may be calculated using a pixel-by-pixelcomparison and area normalization. Upon completion of the edge detectionroutine, a display graphics subroutine is called which superimposes asolid boundary over the set of boundary points. In addition, acalculation box is generated so as to enclose the solid boundary asindicated in FIG. 13. As is discussed below with reference to FIG. 14, atexture analysis program processes pixels from the upper left corner ofthe calculation box, proceeding from left to right and from top tobottom (see e.g., steps 620, 625, 635, 655, 660, 665 and 670).

FIG. 14 is a flow chart depicting implementation of a texture analysisand color determination program (610). Beginning in the upper leftcorner (steps 615 and 620) of the calculation box (FIG. 13), thedifference in intensity between each pixel and its neighbor to the rightis accumulated to produce an aggregate texture error (steps 625, 630,635, 640 and 645). The texture error is normalized by dividing theaggregate texture error by the surface area of the soybean, wherein thesurface area is determined by counting the number of pixels includedwithin the soybean boundary (FIG. 13). The normalized texture errorrelates to the prevalence of surface defects (e.g., mechanical damage,blemishes, shrivelling, or wrinkling).

A determination of soybean color may be made when the imaging system 40is implemented with a set of three data buffers disposed to respectivelystore the red, green and blue intensity of each pixel element. As isindicated by FIG. 14, if a pixel is determined to be green the aggregategreen intensity is incremented (650). The aggregate green intensity maythen be divided by the surface area of the soybean in order to obtain anormalized green intensity. This normalized value is typically of moreutility than red or blue intensity given that the color of soybeans isgenerally some shade of yellow.

Soybeans are routed by the rejection device 50 into the accepted andrejected bins 120 and 130 on the basis of the quality determinationsmade in regard to the impact signal and imaging analysis routines. Ifeither analysis routine indicates that a soybean is of unacceptablequality, the soybean is deposited in rejected soybean bin 130. It isemphasized, however, that a user may specify the extent to which eachmeasured physical parameter contributes to the overall qualityassessment made by each analysis routine.

While the present invention has been described with reference to a fewspecific embodiments, the description is illustrative of the inventionand is not to be construed as limiting the invention. Variousmodifications may occur to those skilled in the art without departingfrom the true spirit and scope of the invention as defined by theappended claims. For example, the teachings of the present invention mayalso be applied to various other agricultural products such as differentvarieties of beans and legumes.

What is claimed is:
 1. An apparatus for determining quality of anagricultural product, comprising:acoustical transducer means forgenerating a transducer signal indicative of a set of physicalcharacteristics of said product; imaging means for synthesizing adigital image representation of said product; and signal processingmeans for analyzing said transducer signal and said digital imagerepresentation; whereby, based on said analysis, a degree of quality isassociated with said agricultural product.
 2. The apparatus of claim 1wherein said acoustical transducer means further includes a drop tubefeeder apparatus for dropping said agricultural product upon saidtransducer.
 3. The apparatus of claim 2 wherein said imaging meansincludes camera means for providing an image of said agriculturalproduct and for digitizing said image so as to create said digital imagerepresentation.
 4. The apparatus of claim 1 wherein said physicalcharacteristics include mass and hardness.
 5. The apparatus of claim 4wherein said digital image representation includes informationpertaining to shape and boundary roughness of said agricultural product.6. The apparatus of claim 5 wherein said signal processing meansincludes means for determining said shape of said agricultural productbased on said digital image representation, said shape determining meansincluding means for identifying a portion of said digital imagerepresentation as corresponding to an edge of said agricultural productand means for determining a center of said product relative to saidedge.
 7. The apparatus of claim 6 wherein said signal processing meansincludes means for determining roughness of said agricultural product byplotting separation between predefined sections of said edge and saidcenter and comparing said plot with a reference plot.
 8. The apparatusof claim 4 wherein said acoustical transducer means includes an impacttransducer, said transducer signal being generated in response to impactof said agricultural product upon said transducer.
 9. The apparatus ofclaim 8 wherein said signal processing means includes means forperforming a time-domain analysis of said transducer signal.
 10. Theapparatus of claim 9 wherein said time-domain analysis means includesmeans for detecting a peak region of said transducer signal, whereinmagnitude of said transducer signal at said peak region corresponds tosaid mass of said agricultural product.
 11. The apparatus of claim 10wherein a slope of said peak signal at a predefined magnitude thereofcorresponds to said hardness of said agricultural product.
 12. Anapparatus for quality determination of beans, comprising:acousticaltransducer means for generating a transducer signal indicative of massand hardness of said beans, said transducer means having a drop tubefeeder apparatus coupled to an impact transducer; imaging means forsynthesizing a digital image representation of said product, saiddigital image representation including information pertaining to atleast one characteristic from the set of bean characteristics consistingof shape, texture, area and color; and signal processing means forperforming a time-domain analysis upon said transducer signal and foranalyzing said digital image representation; whereby, based on saidtime-domain analysis and upon said analysis of said digital imagerepresentation, degrees of quality are associated with said beans.
 13. Amethod for determining quality of an agricultural product comprising thesteps of:dropping said product upon an impact transducer, saidtransducer being disposed to generate a transducer signal indicative ofa set of physical characteristics of said product; creating an image ofsaid product; digitizing said image so as to create a digital imagerepresentation of said product; storing said digital imagerepresentation in computer memory; analyzing said transducer signal anddigital image representation in accordance with predefined criteria;whereby, based on said analysis, a degree of quality is associated withsaid agricultural product.
 14. The method of claim 13 wherein saiddigital image representation includes information pertaining to at leastone characteristic included within the set of product characteristicsconsisting of surface texture, area and color.
 15. The method of claim13 wherein said step of analyzing includes the step of determining saidshape of said agricultural product based on said digital imagerepresentation, said shape determining step including the stepsof:identifying a portion of said digital image representation ascorresponding to an edge of said agricultural product, and determining acenter of said product relative to said edge.
 16. The method of claim 15wherein said step of analyzing includes the step of determining boundaryroughness of said agricultural product by plotting separation betweenpredefined sections of said edge and said center and comparing said plotwith a reference plot.
 17. The method of claim 16 wherein saidagricultural product comprises a bean.
 18. The method of claim 13wherein said physical characteristics include mass and hardness.
 19. Themethod of claim 18 wherein said digital image representation includesinformation pertaining to shape and boundary roughness of saidagricultural product.
 20. The method of claim 19 wherein said step ofanalyzing includes the step of performing a time-domain analysis uponsaid transducer signal.
 21. The method of claim 20 wherein saidtime-domain analysis step includes the step of detecting a peak regionof said transducer signal, wherein magnitude of said transducer signalat said peak region corresponds to said mass of said agriculturalproduct.
 22. The method of claim 21 wherein said time-domain analysisstep includes the step of determining the slope of said transducersignal at a predefined magnitude thereof wherein said slope correspondsto said hardness of said agricultural product.